﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using C2E2C.Entity;

namespace C2E2C.Repository
{
    public interface IRepository<TEntity>
        where TEntity : EntityBase
    {
        TEntity GetByID(int id);
        IEnumerable<TEntity> GetAll();

        void Add(TEntity entity);
        void Remove(TEntity entity);

        TEntity Get(Func<TEntity, bool> where);
        IEnumerable<TEntity> GetMany(Func<TEntity, bool> where);
    }
}
